import React, { useState, useEffect} from 'react'; 
import Btn from "../../components/btn/Btn"; 
import {Toast} from 'antd-mobile';

function ClearStorage() {
    
   
  /*渲染完成*/
  
  useEffect( async ()=>{
    window.localStorage.clear()  
    Toast.success('清除缓存成功') 
  },[]) 
  
  const clearStorageClick = () => {
    window.localStorage.clear()  
    Toast.success('清除缓存成功')
  }
  return (
    
    <div className='v-yuyue-appointment'> 
      <div className='g-abs g-b0 g-l0 g-w100'> 
        <Btn  type='warning' onClick={()=>{clearStorageClick()}} className="appointment-box v-yuyue-box-btn">清除缓存</Btn>
         
      </div>
    </div>
  )
}

export default ClearStorage;

 